package com.cx330;

public class Example21 {
    public static void main(String[] args) {
        int m = 9;
        int n = 9;
        String str = m + "*" + n + "=" + m * n;
        int maxLength = str.length();
        for (int i = 1; i <= m; i++) {
            for (int j = 1; j <= i; j++) {
                str = String.format("%-" + maxLength + "s\t", i + "*" + j + "=" + i * j);
                System.out.print(str);
            }
            System.out.println();
        }
    }
}
